home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 0022-3.564 / dmg-3451 / data / starfild.dat < prev    next >
Text File  |  1987-04-21  |  4KB  |  106 lines

  1.                      STOS STARFIELD DESIGNER
  2.                      ~~~~~~~~~~~~~~~~~~~~~~~
  3.  
  4.                                BY
  5.                          WILLIAM BRYAN
  6.  
  7.      "God, I wish I could work out the waves for those bloody 
  8. starfields everybody is doing these days!", said Eddie, or at 
  9. least something with the same meaning, to Will, mathematical 
  10. problem solver extraordinaire.
  11.  
  12.      "Well, I'm sure I'll be able to fit you in sometime this year 
  13. (being 1991)..........NURSE.....CAN YOU SEND THE NEXT PATIENT IN 
  14. PLEASE?"
  15.  
  16.           Well, it was November, that's right the month before 
  17. December and the one after October, or is it August, or may be 
  18. July, sod it, I can't remember, when I finally started.
  19.  
  20.      The routine works basically like this, define vanishing point (In 
  21. low res 160,100) where all stars will zoom out from at a radius 
  22. set from this point. A number of arrays are set  up to hold X and 
  23. Y positions for each star for each frame. 
  24.  
  25.      Using the SIN and COSINE functions available in stos the X and Y 
  26. positions can be worked out for each star in each frame by 
  27. increasing the radius GEOMETRICALLY (Multiplying by say 1.25) or 
  28. ARITHMETICALLY (Adding 2) each time. This process creates the feel 
  29. of the stars zooming past.
  30.  
  31.      Well you now how it's supposed to work, but forget about that, 
  32. this is how it really works, for all you LAMERS out their, not 
  33. mentioning any names, JOHN GREEN.
  34.  
  35.      At line 48 and 49 in the programme (Ooh arr, misses) a large 
  36. number of varibubbles (As I like to call them) are set to 
  37. different values, these of cause have drastic effects on the out 
  38. come of the starfield.
  39.  
  40.      YMX - The maximum value of Y for a star, once beyond this 
  41.            point the star is ignored and isn't shown or stored
  42.  
  43.      YMN - The minimum value of Y - See above
  44.  
  45.      XMX - The maximum value of X - See YMX
  46.  
  47.      XMN - The minimum value of X - See above
  48.  
  49.      
  50. HOW TO MAKE YOUR STARS LOOK GOOD (Part I)
  51.  
  52.      AIN# - ANGLE INCREASE VALUE (per frame) By setting this 
  53.           different to 0 you can create spiraling starfields, at 
  54.           least as good as the starfield on OOH CRIKEY WHAT A SCORCHER
  55.  
  56.      AF# - Acceleration factor/increase. If prop is set to 1 
  57.          then the radius of the stars from the origin is multiplied by 
  58.          this figure, else AF# is added to the radius
  59.  
  60.      PROP - See above
  61.  
  62.      NS - Number of stars - USES UP MEMORY VERY QUICKLY WHEN 
  63.           INCREASED
  64.  
  65.      NF - Number of frames - USES UP MEMORY VERY QUICKLY WHEN 
  66.           INCREASED
  67.  
  68.      MNR - Minimum radius value - for first frame of every star
  69.  
  70.      MXR - Maximum radius value - see above
  71.  
  72.      MNA - Minimum angle - used for creating semi-circular and 
  73.            other sized/shaped starfields
  74.  
  75.      MXA - Maximum angle - see above
  76.  
  77.      DCP# - Depth Cued Percentage - set to 0.5 for grey stars 
  78.      first half of frames and second half white stars, can be changed 
  79.      to create better effects
  80.  
  81.      SX - Is automatically set to centre of starfield area - 
  82.      should be changed to make optimum use of semi-circular 
  83.      starfields, etc
  84.  
  85.      SY - Y centre - see above
  86.  
  87. Well the programme.....
  88.  
  89.      lines 55-100 create star flight paths
  90.  
  91.      lines 110-240 rearrange stars so they don't all start at 
  92.      same point and it chooses depth cued stars
  93.  
  94.      lines 20000+ VECTCON.BAS built in to save a hell of a lot of 
  95.      memory
  96.  
  97.      lines 1000-1230 DOT DISPLAY ROUTINE - Built in for easy use, 
  98.      uses machine code routine in bank 9 to plot stars
  99.  
  100. Well I hope you have more fun with my Starfield designer that I 
  101. had writing this article for STOS BITS 2, HP SOURCE what ever you 
  102. want to call it.
  103.  
  104.  
  105.  
  106.